/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jobportal;

import java.sql.*;
import javax.swing.JOptionPane;
public class Dbconn {
    public static Connection getConn() {
        Connection con = null;
        try{
            Class.forName("com.mysql.jdbc.Driver");
            con=DriverManager.getConnection("jdbc:mysql://localhost/jobportal","root","root");
        }catch (Exception ex) {
             JOptionPane.showMessageDialog(null, "Connection Establishment Error "
                     + (ex != null ? ex : ""),
                    "Messging Error:", JOptionPane.WARNING_MESSAGE);
        }
        return con;
    }
}
